﻿using System.Collections.Generic;
using System.Data;

namespace hCommand {
    /**
   *┌────────────────────────────────────────────────┐
   *│　描    述：LocSelect                                                    
   *│　作    者：sgj                                              
   *│　版    本：1.0                                              
   *│　创建时间：2021/9/8 16:59:49                        
   *└────────────────────────────────────────────────┘
   **/
    public abstract class LocSelect {
        public virtual bool canWork(long meId ,long beforeId ,List<long> relyTask) {


            return true;

        }
        public abstract CoreWhLoc select(List<CoreWhLoc> locList ,long goodDiff);
        public abstract CoreWhLoc moveSelect(CoreWhLoc src ,IDbConnection Connection ,IDbTransaction transaction);

        public virtual long getGoodDiff(IDbConnection Connection ,IDbTransaction transaction ,AbsCoreStockDetail hisCsdList ,AbsCoreStock cs) {
            if( hisCsdList == null ) {
                return 416224;
            }

            return hisCsdList.itemId * 1000000;
        }

        public virtual bool isLoc(long loc) {
            return loc > 10000;
        }

    }
}
